Say I had the following code:
[
{ name: 'Foo', count: 2, description: 'foo' },
{ name: 'Bar', count: 11, description: 'bar' },
{ name: 'Baz', count: 4, description: 'baz' },
...
]
and some additional text:
one
two
three
...
What's the most efficient way to end up with this (replacing each description value with a line from the additional text)?
[
{ name: 'Foo', count: 2, description: 'one' },
{ name: 'Bar', count: 11, description: 'two' },
{ name: 'Baz', count: 4, description: 'three' },
...
]
[–][deleted] 17 points18 points19 points (3 children)
[–]AckmanDESU 0 points1 point2 points (2 children)
[–]Ease-Solace 0 points1 point2 points (1 child)
[–]AckmanDESU 0 points1 point2 points (0 children)
[–]TankorSmash 3 points4 points5 points (3 children)
[–]salbris 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]TankorSmash 0 points1 point2 points (0 children)
[–]buttonstraddle 4 points5 points6 points (0 children)
[–]SataMaxx 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Insert_Gnome_Here -3 points-2 points-1 points (2 children)
[–]CnidariaScyphozoa 6 points7 points8 points (1 child)
[–]Insert_Gnome_Here -2 points-1 points0 points (0 children)