5 ms·
An array would be a better choice of structure for the sentences instead of hard coding the indexes.."1"...
by _RPM 11y ago
An array would be a better choice of structure for the sentences instead of hard coding the indexes.."1"...
- brudgers 11y agoI see your point and don't disagree. Thinking about why someone might mike the choice to use text, text is more in keeping with *nix philosophy. Not that I'm saying it's better, but grep is pretty light weight and a lot of people use the command line and/or languages other than Javascript. YMMV.
- _RPM 11y agoI'm not sure I understand. JSON is text. JSON provides an array as part of the grammar.
- jlarocco 11y agoI'm not sure I follow you. The JSON response itself is already text. Besides that, nobody processes JSON on the command line without a tool like JQ, and I'd suspect all of those JSON tools support arrays.