Getting data from URL

I am trying to create a sensor that extracts data from a URL. I know this is JSON data, but dont quite get how to process it, can someone give me some advice on this, the URL is

https://api.melbournewater.com.au/rainfall-river-level/228357A/rain/live

and the data that it returns looks like

{
  "liveRainfallLevelsData" : [ {
    "dateTime" : "2020-10-22 23:18:00",
    "currentRainfallLevel" : 0.00,
    "cumulativeRainfallLevel" : 0.00
  }, {
    "dateTime" : "2020-10-22 23:12:00",
    "currentRainfallLevel" : 0.00,
    "cumulativeRainfallLevel" : 0.00
  }
(lots more of them)
 ]
}

I really just want the 3 pieces of data from the first one, which is the newest entry

Try like this:

sensor:
  - platform: rest
    resource: "https://api.melbournewater.com.au/rainfall-river-level/228357A/rain/live"
    name: Current Rainfall Level
    value_template: '{{ value_json.liveRainfallLevelsData[0].currentRainfallLevel }}'

Thanks, It creates the sensor, but it doesnt return any data image

There’s a typo in my post should be liveRainfallLevels not liveRainFallLevels, I corrected my post, please try again.

Yep that does it. I see how it works now, thanks again.

One last question, what would I add to get the timestamp as an attribute?

You could create a REST sensor that contains the three data points (current, cumulative, timestamp) instead of just the current level. And then extract them with a separate template sensor.