Hi,
Have some problem with JSON.parse.
test={}; test['myname']='ESP:33FFD705-41573033-27620843'; test['first']={"pin":A15}; console.log('Orig:'); console.log(test); json=JSON.stringify(test); console.log('JSON:'); console.log(json); console.log('Back:'); console.log(JSON.parse(json));
Here is the output:
Orig: { "myname":"ESP:33FFD705-41573033-27620843", "first":{"pin":A15} } JSON: {"myname":"ESP:33FFD705-41573033-27620843","first":{"pin":A15}} Back: undefined =undefined
Back is undefined. I expected the same as 'test'.
Thanks Sacha
@Sacha started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
Have some problem with JSON.parse.
Here is the output:
Back is undefined. I expected the same as 'test'.
Thanks
Sacha