I'm stepping through a script in the FileMaker debugger, and I think I'm seeing a pretty bad JSON bug, some combination of:
- setting several $variable using JSON using contents of a field
- the field has repetitions
- changing the field contents
What I see is that when the field contents changes, several $variables are updating immediately, even though there is no possible way they could be updating.
It looks as if internally, FileMaker is setting the variable by using a pointer into a JSON object, which itself is using a pointer to the repeating field data, and that when I change the field data, the JSON object and $variables are updating, which should not happen. I'm guessing FileMaker is doing some optimization internally, but it's failing : they are not cloning a JSON object when they should be?
I'll dig some more to figure out if I can reproduce this. Is this a known issue?