<?php
$json = '{
"origem": [
{
"id": 154826,
"nm": "",
"tp": "",
"am": "",
"sg": "SAO",
"sq": 925
},
{
"id": 2289,
"nm": "",
"tp": "",
"am": "",
"sg": "RIO",
"sq": 925
},
{
"id": 154826,
"nm": "",
"tp": "",
"am": "",
"sg": "SAO",
"sq": 925
}
]
}';
foreach($rs['origem'] as $r)
{
$r0[$r["id"]] = $r;
}
PD9waHAKCiRqc29uID0gJ3sKICAib3JpZ2VtIjogWwogICAgewogICAgICAiaWQiOiAxNTQ4MjYsCiAgICAgICJubSI6ICIiLAogICAgICAidHAiOiAiIiwKICAgICAgImFtIjogIiIsCiAgICAgICJzZyI6ICJTQU8iLAogICAgICAic3EiOiA5MjUKICAgIH0sCiAgICB7CiAgICAgICJpZCI6IDIyODksCiAgICAgICJubSI6ICIiLAogICAgICAidHAiOiAiIiwKICAgICAgImFtIjogIiIsCiAgICAgICJzZyI6ICJSSU8iLAogICAgICAic3EiOiA5MjUKICAgIH0sCiAgICB7CiAgICAgICJpZCI6IDE1NDgyNiwKICAgICAgIm5tIjogIiIsCiAgICAgICJ0cCI6ICIiLAogICAgICAiYW0iOiAiIiwKICAgICAgInNnIjogIlNBTyIsCiAgICAgICJzcSI6IDkyNQogICAgfQogIF0KfSc7CgokcnMgPSAoanNvbl9kZWNvZGUoJGpzb24sIHRydWUpKTsKJHIwID0gYXJyYXkoKTsKZm9yZWFjaCgkcnNbJ29yaWdlbSddIGFzICRyKQp7CiAgICAkcjBbJHJbImlkIl1dID0gJHI7ICAgIAkKfQoKZWNobyBqc29uX2VuY29kZShhcnJheV92YWx1ZXMoJHIwKSwgSlNPTl9QUkVUVFlfUFJJTlQpOwoK
[
{
"id": 154826,
"nm": "",
"tp": "",
"am": "",
"sg": "SAO",
"sq": 925
},
{
"id": 2289,
"nm": "",
"tp": "",
"am": "",
"sg": "RIO",
"sq": 925
}
]