I was looking for a way to read data from a JSON and found myself struggling with plug-ins that don't work on iOS and the very nice example from modularfilemaker.org. The example from MFM did not work for me because it can interfere with my own (script-) variables and since it relies on scripts it also a bit difficult to implement without errors.
So I created a set of custom-functions that seem to work in most cases. you can download my examples from: http://www.filemakertips.nl/?ddownload=692 There is a "?"button where you can see the shortest explanation on how to implement the custom-functions.
A few remarks here:
- Make sure that the JSON you evaluate is cleansed from hidden whitespaces like Char(160)
- Paths are written like /element[i]/element[j] etc. instead of $.element.element etc that is simply my preference
- This uses a few recursive functions, where the maximum number of iterations is limited, so there is a limit to the size of JSON that can be evaluated
- This all works on iOS too
Feel free to leave any comments and questions or found issues here in this topic
kind regards, Menno