You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@MGoyal01
Oh, you are asking how to find the line of input that contains the input that caused a jq error to occur; I completely misunderstood what you mean. :|
That will output ["VALID",<resultsofyourexpression>...] if it did not error; and ["ERROR", <filename>, <linenumber>, <errormessage>] if it errored; in that case you would get:
["ERROR","<stdin>",11,"Cannot index object with null"]
Note that it outputs 11 because that is the line on which the input that triggered the error ends.
@MGoyal01 i input_line_number will be the last line in the input that the current input value was part of. In the example above i guess 11 is the ending } of the single input value. Example with multiple input values:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am getting trouble in finding error in jq. Can anyone guide me regarding that!!
Beta Was this translation helpful? Give feedback.
All reactions