Hello Monks,
Background: I have an excel spreadsheet and one of the columns has multiple values separated with a comma like an array. What I want to do is unwind the array so each value of the array is on a separate line and all other fields are duplicated or carried with it mongo documentation of $unwind does what I'd like or it may be a map reduce?
In the below example | is the delimiter in a CSV because I'm trying to target the commas in a particular cell and placing all the same text on each line. For example:
Source:
some text FOO | some text BAR | oh , no , commas | some text BAZ | some text QUXOutput:
some text FOO | some text BAR | oh | some text BAZ | some text QUX some text FOO | some text BAR | no | some text BAZ | some text QUX some text FOO | some text BAR |commas | some text BAZ | some text QUX
In reply to splinting a line of text by comma by benaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |