<?php $json = '{ "servers": [ { "id": "f34c0185-4c9e-40fd-82f6-1d6e9a5d499e", "name": "vm01" }, { "id": "d671ac7d-3b5a-4777-8510-6e8e58295061", "name": "vm02" }, { "id": "h59j23cc-9ve2-4508-1277-85y1lo27562m", "name": "vm03" } ] }'; $j = json_decode($json, true); foreach($j['servers'] as $arr) { if( $arr['id'] == 'd671ac7d-3b5a-4777-8510-6e8e58295061' ) echo $arr['name']; }
You have javascript disabled. You will not be able to edit any code.