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
Describe the bug
Using "from json" my data contains array of objects. Not all of these objects have the same properties. Extracting a partially available property using "get object.rare_prop" results in an error.
This makes "from json | get ..." a lot less usable for me as our data is diverse and I want to be able to use nushell to analyze that data more easily.
turns out I can use "select" which omits empty fields.
Not sure if this is a worthwhile fix / change for get. So I leave the ticket open, just in case... Personally I will use select, so I don't need get to be fixed / changed.
This part of the design is intentional so that someone working with data columns knows that the column is partial. Like you found, you can select out the column, and then us commands like compact if you want to remove the blanks before processing.
This may be more of a documentation thing, so we explain why this case errors, rather than a code issue. Closing this one, but I've created a documentation bug for the docs.
Describe the bug
Using "from json" my data contains array of objects. Not all of these objects have the same properties. Extracting a partially available property using "get object.rare_prop" results in an error.
This makes "from json | get ..." a lot less usable for me as our data is diverse and I want to be able to use nushell to analyze that data more easily.
I think "get" should output a "" or "" or "" for values which cannot be found
The text was updated successfully, but these errors were encountered: