Json question on getting element

Thank you very cool tool.

What you went through was a good exercise in getting to understand json and arrays.
If the end goal is to produce something you need to send to a chart then it may be better to work backwards: if you are using a JavaScirpt chart library then look at what it expects and set out to build that. Otherwise you may get stuck having to transform this array you have now to the expected input format for your chart.

1 Like

Another tool that is very helpful is JSONLint. https://jsonlint.com/

1 Like

As an aside, your loop spawns a new window for every pass through the loop; that can be an expensive operation. If your main reason is that you don't want to lose your current location then create one new window outside the loop and do the looping inside that window.

Alternatively, use ExecuteSQL() to find the data instead of doing actual finds.

Thanks for that tip. It was sloppy to put it inside the loop. The whole reason for the new window was to just save the spot the user starts at.

Charts will be a whole new lesson for me. I have dabbled with them and always walked away unsatisfied with my finished results. It seems like the built in FileMaker charts are very limited and hard to make look good. I have looked at JavaScirpt charts but I know almost nothing about JavaScirpt. At the FileMaker conference I got a demo from Geist Interactive and it opened my eyes of what you can do with JavaScirpt so I see the benefit.

Lots to learn so little time. I am happy I was able to get as far as I did with JSON before other duties pulled me away.