Guidance - Json Files

Hi,

Im just wondering how I can complete a task.

We have a list of json files that contain all information about our companies dev teams. Which is useful for IDR in finding who owns what, and who to contact
What I’ll like to do is be able to put in a search term and insightconnect then searches all the json files for a match.

You think this is possible? how would I go about it?

Thanks

I do something similar with a ssh and grep (or PowerShell if it is on Windows), but it isn’t really pretty or InsightConnecty but it might get you what you want

1 Like

Roughly how long is your list of files? One way to solve this could be to create a Global Artifact, set the schema to match the schema of your JSON files, add the files to the Global Artifact and then in any of your Workflows you would be able to perform lookups in the Global Artifact.

1 Like

Just to make sure I have the use case down…given a piece of text, return a JSON object that contains that text?

I don’t think we can do a true search (think like fuzzy matching or stuff like that), but contains is doable.

You could read in all the JSON in a WF, and loop through each JSON object using a loop step. In the loop, use a decision step to see if your input text is in the JSON object. If it is, then “exit” the work flow with an artifact, API call, or Chat Ops step with that JSON object (or just pass it down the WF to where you are going to use it).

  • Loop
  • Decision on contains
  • Do stuff with the Loop item

That’s how I’d approach the problem.

1 Like