I want to create the following json string
{"water": {"amount": 0}}
To do that I wrote the following code:
df_water <- list(amount = 0)
info <- list(water = df_water) %>%
toJSON()
But that results to:
{"water": {"amount": [0]}}
Any clues how can I remove the array from "amount" value?