Gps json rest sensor on map

Hello,

I have a LoRa gps tracker running on my boat and i can get the latitude and longitude in JSON format from my webserver, the result looks like:

{"latitude":53.*****,"longitude":7.******}

I can’t seem to find a usefull guide on how to intergrate these results, updated every 5m to a sensor and to display the boat (as a person i think) on the map

i have something like this only it doesnt work the way is think its suposed to

  - platform: rest
    name: boat_sensor
    json_attributes:
      - latitude
      - longitude
    resource: https://****.duckdns.org/api/index.php?get=DEVICE
    scan_interval: 120

it’s displaying the raw output of the json in the sensor

Anyone have a sugestion?

Fixed it!

I used

rest:
  - resource: https://****.duckdns.org/api/index.php?get=DEVICE
    scan_interval: 120
    sensor:
    - name: boat_longitude
      value_template: '{{value_json["longitude"]}}'
    - name: boat_latitude
      value_template: '{{value_json["latitude"]}}'



template:
  - sensor:
      - name: "BoatGPS"
        state: "OK"
        attributes:
          longitude: "{{states('sensor.boat_longitude')}}"
          latitude: "{{states('sensor.boat_latitude')}}"