build object from json structure