Skip to main content

Posts

Showing posts with the label Command

Filter Json File dengan Jq Command

File example.json yang berbentuk json array berikut contoh: [     {         "CompetitorID": 1,         "Name": "John Doe",         "Score": 85     },     {         "CompetitorID": 2,         "Name": "Jane Smith",         "Score": 92     },     {         "CompetitorID": 3,         "Name": "Alice Johnson",         "Score": 78     },     {         "CompetitorID": 4,         "Name": "Bob Wilson",         "Score": 91     },     {         "CompetitorID": 5,         "Name": "Eve Brown",         "Score": 89     } ] Filter yang score nya diatas 80 jq '.[] | select(.Score > 80)' your_data.json Output: jq '.[] | select(.Score > 80)' example.json   {   "CompetitorID" : 1 ,   "Name" : "John Doe" ,   "Score" : 85 } {   "CompetitorID"