У меня есть данные json, которые я хочу создать в таблице на основе ответа json. Я хочу сгруппировать значение на основе SalesStage. В группе 1 есть данные только для Qualified ,Proposal Submitted and Negotiation & Contracting
. В группе 2 есть только данные Closed Won
, В группе 3 Closed lost,Deferred
и в группе 4 Identified,QO under Evaluation
[{Geo: "US West", SalesStage: "Identified", count: 24, pipelinevalue: 3140000},
{Geo: "US East", SalesStage: "Identified", count: 22, pipelinevalue: 1303344},
{Geo: "NSU", SalesStage: "Proposal Submitted", count: 2, pipelinevalue: 554000},
{Geo: "US East", SalesStage: "Proposal Submitted", count: 12, pipelinevalue: 4516510},
{Geo: "NSU", SalesStage: "Qualified", count: 1, pipelinevalue: 60000},
{Geo: "US West", SalesStage: "Proposal Submitted", count: 5, pipelinevalue: 977914},
{Geo: "US East", SalesStage: "Qualified", count: 1, pipelinevalue: 480000},
{Geo: "US West", SalesStage: "Qualified", count: 5, pipelinevalue: 1084400},
{Geo: "US East", SalesStage: "Closed Won", count: 30, pipelinevalue: 11725971},
{Geo: "US West", SalesStage: "Closed Won", count: 7, pipelinevalue: 937536},
{Geo: "US West", SalesStage: "Closed Lost", count: 91, pipelinevalue: 9799084},
{Geo: "US East", SalesStage: "Deferred Opportunity", count: 26, pipelinevalue: 1858042},
{Geo: "US West", SalesStage: "Deferred Opportunity", count: 3, pipelinevalue: 777000}]
Ожидаемый результат group1 =
[{Geo: "NSU", SalesStage: "Qualified", count: 1, pipelinevalue: 60000},
{Geo: "US East", SalesStage: "Qualified", count: 1, pipelinevalue: 480000},
{Geo: "US West", SalesStage: "Qualified", count: 5, pipelinevalue: 1084400},
{Geo: "NSU", SalesStage: "Proposal Submitted", count: 2, pipelinevalue: 554000},
{Geo: "US West", SalesStage: "Proposal Submitted", count: 5, pipelinevalue: 977914}]
group2=[{Geo: "US East", SalesStage: "Closed Won", count: 30, pipelinevalue: 11725971},
{Geo: "US West", SalesStage: "Closed Won", count: 7, pipelinevalue: 937536}]
group3=[{Geo: "US West", SalesStage: "Closed Lost", count: 91, pipelinevalue: 9799084},
{Geo: "US East", SalesStage: "Deferred Opportunity", count: 26, pipelinevalue: 1858042},
{Geo: "US West", SalesStage: "Deferred Opportunity", count: 3, pipelinevalue: 777000}]
group4=[{Geo: "US West", SalesStage: "Identified", count: 24, pipelinevalue: 3140000},
{Geo: "US East", SalesStage: "Identified", count: 22, pipelinevalue: 1303344}]