organize json by level