JSFiddle - React, Tailwind, and code Playground

by bvotcode

JavaScript

var input= {
    "property0": [
      {
        "text": "Test task 01",
        "type": "text"
      }
    ]
  }
  
function handler(input) {
var key = 'property0';
var nameoftask = input[key];
var output= nameoftask[0].text
//return nameoftask;
return output;
}
output = handler(input)
console.log(output)