Aloha,

I’m getting my feet wet with v17’s dot notion/objects.

My first use is converting a Google Sheet JSON into something easily 
accessible. I was thinking to a property:value 4D Object.

Does anyone have a utility method that does this?

It’s a JSON array of arrays from the Google Sheet that has the headers in the 
first “row” of the array "values[0]”:
[
[ID,First Name,Last Name],
[5912029,Sannyasin,Siddhanathaswami],
[6015906,Mayuran,Sokkan]
]

My goal is to be able to reference this new object by doing something like:
$lastName:=$convertedObject[“ID”][“6015906”][“Last Name”]

I don’t really know what I’m doing. Would that even work?

Is there an easy way to approach this? If it was just this one Google Sheet, 
I’d probably loop through each array and see if element [0] matched the ID I 
was looking for. If it did, then I would grab element [2]. But this seems like 
the wrong approach.

Any tips or things to research would be greatly appreciated.



Sannyasin Siddhanathaswami
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to