Extend was converting array to simple object. Also, there is no need to create new object using extend since "inlines" is being dumped from "final_json" later.