Avatar of aviator21114
aviator21114

asked on 

Javascript query of JSON data file

Actually my original question was answered by Alexcode in a post named "XML query in Javascript"  I have a follow up question and didn't know if it could be viewed in the original post since it's closed.   As such the javascript that Alex presented is noted there.. Works wonderfully.   Please read it for the context of my follow up question..

I want to return multiple values of the query result.  If I query by "i" which is airport id I also want to return the "n" airport name and "t" and "g" the lat/long values.   I'm not sure how to do this.

Additionally, I want to move the JSON file to be external to the script.  How does this get named and also how do I reference the external JSON file from within the actual script doing the lookup

Thank you in advance for your input...
JavaScript

Avatar of undefined
Last Comment
Eddie Shipman
Avatar of aviator21114
aviator21114

ASKER

Thank you for including the link for me.  I was in a hurry and didn't take the time to figure out how to do this... Apologies...
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

I update the fiddle to show how to have external data.
Avatar of aviator21114
aviator21114

ASKER

Eddie... Apologies, I didn't see that you had posted to my question...  Let me take a look at this and digest it..

Thank you,
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Cleaning up after just a little over a month?
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo