I have an array which is getting from user formatted json, like this
'UA27' => [
'PRODUCT' => 'S',
'CANBECONSUMED' => true
],
'UA28' => [
'PRODUCT' => 'R',
]
],
'UA29' => [
'PRODUCT' => 'O',
'CANBECONSUMED' => true
],
'UA29' => [
'PRODUCT' => 'O',
'CANBECONSUMED' => false
],
'UA31' => [
'PRODUCT' => 'P',
'CANBECONSUMED' => true
]
But I have to figure out if there is more than one array with the same key to show that user has error with json.
Thank you.