skip to Main Content

Transforming a JSON input subarray into a string sequential list output

Here is my input: { "alias-name": "soufriere", "member-entry": { "alias-entry-name": [ "21:00:f4:e9:d4:50:56:7e", "21:00:f4:e9:d4:50:56:7f" ] } } { "alias-name": "stromboli", "member-entry": { "alias-entry-name": [ "21:00:f4:e9:d4:50:56:8e" "21:00:f4:e9:d4:50:56:9e" ] } } I'd like to turn this into output alicreate "soufriere","21:00:f4:e9:d4:50:56:7e;21:00:f4:e9:d4:50:56:7f" alicreate "stromboli","21:00:f4:e9:d4:50:56:8e;21:00:f4:e9:d4:50:56:9e" I…

VIEW QUESTION

Replace part of the value of a json using regex and jq

I have a json like bellow: [ { "name": "architecture-design-detailed", "rootPath": "/media/ismail/architecture-design-detailed/_Working/_NotesFiltered/_software/architecture-design-detailed", "paths": [], "group": "", "enabled": true }, { "name": "architecture-design-detailed-engineering", "rootPath": "/media/ismail/architecture-design-detailed/_Working/_NotesFiltered/_software/architecture-design-detailed-engineering", "paths": [], "group": "", "enabled": true } ] If name is architecture-design-detailed, change name to new_name_here…

VIEW QUESTION

how to get objects from json file?

I have a json file as below { "requestData": { "username": "admin" }, "eventTime": "2023-12-01T23:50:02.554+0000", "observer": { "id": "target" } I want to get only the below output side by side,O/P "username": "admin","eventTime": "2023-12-01T23:50:02.554+0000" I tried using below but, able…

VIEW QUESTION

json jq formatting unnamed objects onto single line

Another question re 'jq' formatting onto a single line. Here is my json file: "facet_counts":{ "facet_queries":{}, "facet_fields":{ "title":[ "primary",5981, "database",5965, "source",5963, "eecm",5949, "the",5066, "research",4888]}, "facet_ranges":{} } } As you see there is no label assigned for the tuplets within the…

VIEW QUESTION
Back To Top
Search