What’s throwing me off here is that the JSON is literally saying “label” and “value” when “Accession Number” just is the label/name for an object (once the JSON is parsed out to JS) with its value being “03547”.
So it’s not just “get the value for Accession Number”:
parseJson(value).get("Accession Number")
Somehow, I need to read down the tree here?
metadata –> “label” –> with value of “Accession Number” –> “value” –> The Value I’m Looking For
The first is kind of a hack which uses string manipulation to convert the JSON array to a JSON object with the label values as keys.
The second iterates through the array and matches the label using an If function.