transform json to a more standard format