Getting an objects property with slashes in it

freebase, php

Solution

This should do it:

$json->{"/common/topic/article"}[0]->id

Problem

I'm getting a json result back from an api request to the freebase database. This is part of the object returned called $json. A var dump of $json: ``` stdClass Object ( [name] => Abomey [/location/statistical_region/population_growth_rate] => [/common/topic/article] => Array ( [0] => stdClass Object ( [id] => /m/0jk2c ) ) ``` How can I subtract the /m/0jk2c part? $json->/common/topic/article[0]->id (obviously) doesn't work.

Original source