Get api values with javascript

I try to get some values from an api.
The api is

I want for example the value for fwiindex to put on my homepage.
Can I use something similar like

type or paste code here

var queryURL = "//";
$.getJSON(queryURL, function(data) {
  var result = data[0].sensordatavalues
  var value = result[0].value
  $('#output').append('The value is ' + value);

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

If you use the URL it redirects to instead it should work with the code you have.

Yes, but I want to have the fwiindex from the api

The other code was just an example. I am not really sure how to code to get the value.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.