Member-only story
How to Coda with JSON — main
Applying basic JSON knowledge in Coda
In my previous blog on JSON I explained basics like why the double quotations ( “ “) are important, how you open with [ ] for Arrays and { } for objects and that in most cases we deal with (nested) objects.
This is not so difficult as it looks. Certainly for those who know a bit how to Coda, you will rapidly see similarities between what you do in your docs and what is required to deal with JSON. Yes there are differences, but they are mainly hard in your mind before you look into it. Developers are not a class of exceptional gifted beings. Most are like you and me, curious people who want to make better use of data. There is no excuse not to deal with JSON logic, on top it offers great benefits as you will see later on (and in my next blog).
I came across ParseJson()
only recently when I contacted Scott to ask him about the Regex he applied in his video on images in forms. As an alternative for the Regex, I developed a logic using Slice()
and Find()
to isolate the image URL. Both his Regex and my solution proved to be unnecessary when you have ParseJson()
in your toolkit. First I had to understand what JSON was before I could see the beauty. We start with extracting the JSON Object using _Merge() + “ ”
, see below (merci Scott).