JSFiddle - React, Tailwind, and code Playground

by Arif Hasan

JavaScript

var abc = [{
    "id": "30eb1911-706d-4164-bd7e-201354a1da96",
    "start_time": "2020-04-01T03:42:12",
    "end_time": "2020-04-01T03:43:12",
    "modified_start": null,
    "modified_end": null,
    "activity": null,
    "screenshots": [],
    "project": {
      "id": "ccaf7b45-932e-40d0-bef3-eb43586dcc3c",
      "name": "Project 2"
    },
    "task": {
      "name": ""
    },
    "client_app": "desktop"
  },
  {
    "id": "45aee54d-1bba-4dc4-8051-508924c54d62",
    "start_time": "2020-04-01T03:43:12",
    "end_time": "2020-04-01T03:44:12",
    "modified_start": null,
    "modified_end": null,
    "activity": null,
    "screenshots": [],
    "project": {
      "id": "ccaf7b45-932e-40d0-bef3-eb43586dcc3c",
      "name": "Project 2"
    },
    "task": {
      "name": ""
    },
    "client_app": "desktop"
  }
]

// What's the shape of the last fruit
var currentShape = abc[abc.length - 1].id;
alert(currentShape)