diff --git a/addBindings.jq b/addBindings.jq index 10bb74a..0691c3e 100644 --- a/addBindings.jq +++ b/addBindings.jq @@ -2,12 +2,12 @@ . | debug("Filtering...") | .tags[] -|= select(.typeId == "Cooling/PLC_AB/PLC_AB_Auto_v3") +|= select(.typeId == $typeId) # Sort first | debug("Sorting...") | walk( if type == "object" and has("tags") then .tags |= sort_by(.name) end ) # so object positions are predictable -| 2 as $pos +# | 2 as $pos | .tags[0].tags[$pos].tags as $baseData | debug("Modifying tags...") | .tags