Operations with API

Hello everyone, I state that I have already created the site with WP and with plugins to upload and manage JSON files. But I would like to recreate it with Wappler.
I need help figuring out how to proceed.
In WP I used twig for some operations
example

{% for w in data%} {% if (w.time.status == 'LIVE') or (w.time.status == 'HT') or (w.time.status == 'FT') or (w.time.status == 'AET')%} {{w.scores.localteam_score}} {% else%} -- {% endif%} {% endfor%}

With Wappler I can display the data contained in the JSON file, but I don’t know how to operate with them,
eg how to use if then
Any tips or tutorials to watch …
Unfortunately, I’m not a programmer :frowning:

Can I write in PHP like this?

    <?php if (
                                    {{time.status}} == 'LIVE' || {{time.status}} == 'HT' || {{time.status}} == 'FT' || {{time.status}} == 'AET') {
                                        {{scores.localteam_score}}
                                    } else {
                                        '--'
                                    }?>

Hi.
If you have the values available on the page in some variable or server connect, you can use it to set text/value/html dynamic input of, say, a paragraph element. In the value part, you can use ternary operator in code view to setup the conditional text as you want.

I am not sure how much you have been working with Wappler, so don’t know if you understand how the bindings work in Wappler.

1 Like

Thank you for your reply
I found “Show or Hide Elements Conditionally” and I understood how to solve my problem!
Most importantly, I understand the dynamics of moving forward with the software.

:smile:

1 Like