code for flattening json File