Monday, April 1, 2013

Scott Stroz Vows to make a Better Stack Overflow

Odd behavior with structFindValue() with JSON

The JSON value of true displays as YES

Line 13 & 14 should work correctly right?

 variables.miner.cat=variables.miner.dog.alive;
 variables.miner.livedog = structFindValue(variables.miner.dog, variables.miner.cat, "all");

Line 12 works correctly and finds the value in the struct:

variables.miner.liveWorker = structFindValue(data.workers, true, "all");

Adam Cameron says as I paraphrase, "Clear as mud!"

Here is his code: