Answer the question
In order to leave comments, you need to log in
How to remove duplicate elements in an array?
Good afternoon, there is an array collected in json
"to":
{
"10":
{
"out": 1.01,
"in_min_amount": 100
},
"12":
{
"in": 12521.2,
"in_min_amount": 100
},
"13":
{
"in": 1084,
"in_min_amount": 0.1
},
"18":
{
"in": 1.0616,
"in_min_amount": 100
},
"20":
{
"out": 26.1182,
"in_min_amount": 20
}
}
Answer the question
In order to leave comments, you need to log in
Go through the double for, pushing each key into the buffer, and if it is already in the buffer, just delete it along the for path.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question