Hi Dojo,
I'm querying some data using GQI and one of my columns contains JSON data in a string field, like this:
Metadata
{"Index":0,"ResourceId":"4cab6949-827c-463f-a5db-cb193ddaffba"}
{"Index":1,"ResourceId":"cacdb3e5-b97b-4b6e-8357-f87972311d21"}
{"Index":2,"ResourceId":"b6259d63-9e6b-4d5f-8e4b-ca608cbdc47c"}
{"Index":3,"ResourceId":"02495145-a4dc-48ad-bb86-267172722b11"}
{"Index":4,"ResourceId":"5e40df1d-75b3-4dcc-bcfb-2040cab9b226"}
{"Index":5,"ResourceId":"a2eb4619-d36d-4a07-afde-bb1f27eeb732"}
I would like to use regex column manipulations to extract the value of the Index and ResourceId keys from this string into separate columns. Is there some generic way where I can just substitute the correct JSON key name in the regular expression and match its value?
Hi Reinout,
Although you can indeed achieve this with a regular expression, I believe a better solution would be to develop a new custom operator that can parse JSON. This operator can then allow selecting a property from the JSON object.
This approach can then be reused for every solution that uses JSON data and would be a good fit for our custom operator catalog.
![](https://community.dataminer.services/wp-content/uploads/wp-user-manager-uploads/2023/02/1641976833115.jpg)
Sounds like a great use case indeed for a custom GQI operator! Love the idea.