I am trying to return an array that contain of one of property. So there is an array of objects like
[{x: 5, y: 607, width: 782, height: 602, line_width: 3, …},
{x: 10, y: 602, width: 772, height: 592, line_width: 3, …},
{x: 0, y: 400, size: 18, text: 'This cer..}, ..]
Some object has section: 'TextInstruction'
property defined and some do not.
I am trying to return an array that is only containing section
with no duplicate and no undefined.
So return ['TextInstruction', 'RectangleInstruction', ...]
No [undefined, 'TextInstruction', 'TextInstruction', ...]
Can anyone help me with JavaScript to get this using reduce() function?