where(array("id" => $id))->find(); if (!$value) { return false; } $data["id"] = $value["id"]; $fields = json_decode($value["value"], true); foreach ($fields as $index => $field) { $data[$index] = $field["value"]; } return $data; } }