In: Computer Science
how do we use dictionaries to get json api in MIT app inventor
We can use dictionaries to display response message results in MIT App Inventor.
1. There is a method called "JsonTextDecodeWithDictionaries" method in which whenever we set an API using JSONplaceholder, it returns a response text using the above-mentioned method. It returns an object type in the form of a dictionary.
2. After we got the dictionary as the result, we can use it to display the response message by assigning a title as key, and then we can check if any response received in the value we can print the result as "Found" else if there is no value, we can print it as "Not Found".
Consider the below image for reference.
Above image is reference from: Official MIT Inventor website.