I have been using this method to convert json text to dictionary. However, when it faced objects in array, the dictionary is completely wrong.
{ "names": [ { "name": "Peter", "age": 30 }, { "name": "John", "age": 27 }, { "name": "Luke", "age": 34 } ] }
Thanks in advance.
Just tried that with this block in AI2, it worked perfectly:
That’s because the block in Kodular is meant for responses from APIs which turns the response into a list so that it’s easier to parse. The block from App Inventor is specifically meant for Dictionaries that are built-in to the builder.