Im working with json data that changes sometimes. Sometimes Segment is only a list, and sometimes segments is a object first and then a list. Im streaming the json data from an url, so ive saved it into a txt file few days ago and thas why todays date not displayed. EDIT: Updated with the json data that changes and added all the snippets i have. Here are the two different json strings: Im working with json data that changes sometime