# Ignition 8.0.16 - jsonGet : invalid character in key?

**URL:** <https://forum.inductiveautomation.com/t/ignition-8-0-16-jsonget-invalid-character-in-key/40032>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [October 26, 2020, 7:45pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-16-jsonget-invalid-character-in-key/40032 "2020-10-26T19:45:51Z")\
**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:** [October 26, 2020, 7:45pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-16-jsonget-invalid-character-in-key/40032/1 "2020-10-26T19:45:51Z")

</div>

**Ignition 8.0.16**

I use jsonGet expression with a Document Tag.

I search a key

```auto
Broadcom NetXtreme Gigabit Ethernet

```

with:

```auto
jsonGet(jsonGet(toString({[.]../_intern/IF_TABLE}),"Broadcom NetXtreme Gigabit Ethernet"),"_1_3_6_1_2_1_2_2_1_8")

```

**Return is Ok**

and another key

```auto
Broadcom NetXtreme Gigabit Ethernet #2

```

with:

```auto
jsonGet(jsonGet(toString({[.]../_intern/IF_TABLE}),"Broadcom NetXtreme Gigabit Ethernet #2"),"_1_3_6_1_2_1_2_2_1_8")

```

**Return is Not Ok**

Is there any characters invalid for key used with **jsonGet** expression ?

---

<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:** [October 26, 2020, 8:09pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-16-jsonget-invalid-character-in-key/40032/2 "2020-10-26T20:09:32Z")

</div>

The ‘#’ in there prevents it from being treated like a path, so you have to use the clunky square bracket syntax instead:

```auto
jsonGet("...some JSON...", "['Broadcom NetXtreme Gigabit Ethernet #2']")

```

Any time you would have a path like this:

```auto
jsonGet("...some JSON...", "foo.bar")

```

you can also do this:

```auto
jsonGet("...some JSON...", "['foo']['bar']")

```

where the former syntax only allows what would be valid JS identifiers (though it also accepts spaces in them).

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [March 3, 2021, 9:18pm UTC](https://forum.inductiveautomation.com/t/ignition-8-0-16-jsonget-invalid-character-in-key/40032/3 "2021-03-03T21:18:11Z")

</div>

Thanks @Kevin.Herron! This just saved me. This would be really helpful to add the user manual. Cheers!
