# jsonGet expression bug with interger key?

**URL:** <https://forum.inductiveautomation.com/t/jsonget-expression-bug-with-interger-key/20663>\
**Category:** Ignition\
**Created:** [November 8, 2018, 12:43pm UTC](https://forum.inductiveautomation.com/t/jsonget-expression-bug-with-interger-key/20663 "2018-11-08T12:43:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 8, 2018, 12:43pm UTC](https://forum.inductiveautomation.com/t/jsonget-expression-bug-with-interger-key/20663/1 "2018-11-08T12:43:57Z")

</div>

jsonGet("{‘A’:‘FERME’,‘1’:‘OUVERT’}",‘A’) return FERME  
jsonGet("{‘A’:‘FERME’,‘1’:‘OUVERT’}",‘1’) don’t return anything ???  
jsonGet("{0:‘FERME’,1:‘OUVERT’}",1) don’t return anything ???

is there any anything special with integer ou interger string ???

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 8, 2018, 2:23pm UTC](https://forum.inductiveautomation.com/t/jsonget-expression-bug-with-interger-key/20663/2 "2018-11-08T14:23:30Z")

</div>

Can you try just for fun wrapping the 0 in single quotes?  
jsonGet("{‘0’:‘FERME’,1:‘OUVERT’}",1)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 8, 2018, 2:25pm UTC](https://forum.inductiveautomation.com/t/jsonget-expression-bug-with-interger-key/20663/3 "2018-11-08T14:25:08Z")

</div>

This is a little bit of a weird case, but this works:

`jsonGet("{'A':'FERME','1':'OUVERT'}", "['1']")`

The path has to be a valid JS literal as well… so it can’t start with a number, so we added this implicit context where you can access it dictionary style.
