JSFiddle - React, Tailwind, and code Playground

by pierian_design

JavaScript

let aDiffsBySheets = [
		{
        "rowGroups": [
						{rows: [1], status: 'unique'},
            {rows: [3,4], status: 'unique'},
            {rows: [1], status: 'different', cols:[1]},
        ],
        "sheetInfo": {
          "sName":"reference"
        }
    },
    {
    		"rows":{
        		"different": [
            		{ "row":0, "cols":[1] },
                { "row":2, "cols":[3] }
            ],
            "unique":[
            		[1],
                [3,4],
                [6,11],
                [7,12],
                [8,13]
            ]
        },
        "sheetInfo":{
            "sName":"Copy of option2"
        }
    }
];

let obj = {
            "unique": [
                [1],
                [3,4]
            ],
        		"different": [
            		{ "row":5, "cols":[1] },
            ],
}


console.log(Object.keys(obj).map(el => obj[el]).flat());