How to look up a value in Json and use it to set a buttons text

I have the following JSON

    {
             "books" : 
             [
             {"bookid":"b1", "title":"The Lion, The Witch and The Wardrobe"},
             {"bookid":"b2", "title":"Lord of the Rings"},
             {"bookid":"b3", "title":"Aesops Fables"}
             ]
    }

I have 3 buttons set up on different parts of a page.
I want to be able to assign a bookid to the buttons and depending on the bookid the button text should be the corresponding title from the json file.

Should i make the Button Properties ID to say “b2”. Then use that to set Dynamic Attribute Inner Text of Button after looking up the corresponding title in the json file. But i don’t know what the expression should be.

Is this even the right way workflow?

Community Page
Last updated: