I am trying to decode the following JSON object into a Reason object.
{"AAPL":{"price":217.36}}
The key in the root of the object is dynamic.
The following general example works when the key is not in the root. How would I change it so it works for a dynamic key in the root?
module Decode = {
    let obj = json =>
    Json.Decode.{
      static: json |> field("static",string),
      dynamics: json |> field("dynamics", dict(int)),
    };
};
 
     
    