Use parseJson on field that has a : (colon) in the key name

Hi,

Just deployed the compute optimizer dashboard. I’m trying to use an AWS tag (field = tags), but I have a unique issue. Some of my tags have a colon in the middle of the key name (i.e. JP:CostCenter ).

Example:
{“Name”:“Server1”, “JP:CostCenter” : “5566”}

parseJson works OK on the Name field (i.e. parseJson(tags, ‘$.Name’)

When trying the same for JP:CostCenter (i.e. parseJson(tags, ‘$.JP:CostCenter’)

It saves, but then I get this in the dataset:

“The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again.”
image

I’ve tried searching the forum, but no luck. Feel like someone may have already tackled this one. Thanks in advance!

Figured out after some trial and error. Perhaps this may help someone else:

parseJson(replace({tags}, ‘JP:’, ‘JP’), ‘$.JPCostCenter’)

Essentially strip out the colon : first, the use parseJson. Easy Peasy