Here i have two array's like first array is,
[
"A",
"B",
"A",
"B",
"N",
"B"
]
second array like,
[
{
"A": "2,141.8"
},
{
"B": "2,141.8"
},
{
"A": "2,141.8"
},
{
"B": "2,376"
},
{
"N": "2,376"
},
{
"B": "2,376"
},
]
But i need to compare first array objects into the second array,if it is equal to both Key and object values i want like this,
{
"A": [
{
"A": "2,141.8"
},
{
"A": "2,141.8"
}
],
"B": [
{
"B": "2,376"
},
{
"B": "2,376"
}
]
}
Can you please suggest me how can i implement this,Thank you.