0
    const testFunc = () => {
let test = [];
    axios
      .post('test.com', {
        filters: [
          {
            comparison: 'eq',
            fieldName: 'ID',
            fieldValue: `${id}`,
          },
        ],
      }).then(({ data }) => test = data);

return test;
}

I need to write to the variable what I get in the response, but the attempt to do this ends with nothing being written to the variable

Roamer-1888
  • 19,138
  • 5
  • 33
  • 44

0 Answers0