0

this is the response i want to filter :

Im using an API called govmap https://api.govmap.gov.il/#intersect-features , this is the function that sending the response to the devtool:

THIS FUNCTION IS IN <-head-> --> on index.html

 function showExample() {
            var params = {
                type: govmap.locateType.lotParcelToAddress,
                address: 'jerusalem 21, tel aviv'
            }
            govmap.searchAndLocate(params).then(function (response) {
                console.log(response)
            });
        }

I want to filter the response (screenshot added with picture at the beggining) so the output will only INCLUDES Values who's in data .

any Suggestions?

11
  • Have you tried console logging response.data? Commented Sep 12, 2021 at 7:23
  • yes i tried , i did response.type to know the object type the output is Undifined , and response.data not an exists function. Commented Sep 12, 2021 at 7:25
  • 2
    Have you tried doing .catch to see if there's any error? The use is func().then().catch(e => console.log(e)). Because if the API requires JSON, you usually need to stringify the params by JSON.stringify(params). Also, response.data is not a function, but it's an attribute of Object response. Commented Sep 12, 2021 at 7:28
  • 1
    Your screenshot shows that the object has no property with the bane type. But it does has a property named data. On the last lines you have a function (response){ Console.log(response)} On that console log when you write response.data does it shows undefined? Commented Sep 12, 2021 at 7:28
  • 1
    @EAzevedo response.data now shows the data . but how i filter Values? Commented Sep 12, 2021 at 7:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.