0

API RESULT

Hello,

the result of an API request is this 

{"data":[{"pec":"test@pec.it","history":[]}],"success":true,"message":"","error":null}

I would like only the value test@pec.it to be pasted into a text field. How can I do that?"

4 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 1 mth ago
    • Reported - view

    parseJSON(JsonResult).first(data).pec

      • Andrea.1
      • 1 mth ago
      • Reported - view

       

      This is my code, how do I implement your code?

      let header := {
              Authorization: "Bearer MYTOKEN",
              Accept: "application/json",
              'API-NUMBER': "MYAPI"
          };
      let myURL := "https://company.openapi.com/IT-pec/xxxxx";
      let response := do as server
              let response := http("GET", myURL, header, null);
              'Testo 2' := formatJSON(response.result)
          end;
      void

      • Ninox partner
      • RoSoft_Steven.1
      • 1 mth ago
      • Reported - view

       

      let header := {
              Authorization: "Bearer MYTOKEN",
              Accept: "application/json",
              'API-NUMBER': "MYAPI"
          };
      let myURL := "https://company.openapi.com/IT-pec/xxxxx";
      let response := do as server
              let response := http("GET", myURL, header, null);
              let resu := formatJSON(response.result);
              'The field you want to fill' := parseJSON(resu).first(data).pec
          end;

      Hope this helps.

      • Andrea.1
      • 1 mth ago
      • Reported - view

       

       

      wow, thank you!

Content aside

  • 1 mth agoLast active
  • 4Replies
  • 31Views
  • 2 Following