HTTP GET in JavaScript | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
HTTP GET in JavaScript
Avatar
jteindl

Silver
Forum Posts: 8
sp_UserOfflineSmall Offline
1
July 25, 2017 - 4:04 pm
sp_Permalink sp_Print

 I am working in JavaScript and need to pull data from one field on my Thingspeak chart. This is the piece of code I am working with:

 

stop = new google.maps.LatLng(49.093914487013, -117.71569423377514)

waypts.push({

location: stop,

stopover: true

 

The line in Bold is what I am trying to set a dependency on. How do I do an If/Else statement essentially to pull from a field on my Thingspeak chart, and say if the value is >8 stopover: true and if value is <8 stopover: false

 

So how would I call a field to get the value and set the if/else based on that? 

 

Thank you in advance for your help!

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: cstapels
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

yeseniara11

RomanFug

JamesPes

RobertBak

ScottSmiva

Amourhotte

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee