Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8126019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:00:47+00:00 2026-06-06T07:00:47+00:00

I have a list of data in javascript that looks like this: [[152, 48,

  • 0

I have a list of data in javascript that looks like this:

[[152, 48, 'http://www.google.com'], 
 [198, 47, 'http://www.stackoverflow.com'], 
 [199, 45, 'http://www.apple.com']]

I am using flot to create a plot, and am trying to pass this third value to access a hyperlink from the point. As such, I am trying to lookup the third value of each list by using the first two as the lookup keys (i.e., [[x,y,hyperlink],[x2,y2,hyperlink2]], click on a point, then use the appropriate (x,y) to find the corresponding hyperlink)

Is there anyway to do this, or do I need to pass some dictionaries for x and y to javascript, then find the common variable from the two lists that were looked up? In python I know you could do a filter of list on the x value with itemgetter, then lookup a link corresponding to the y value. But I know almost nothing about js, so could a solution to ID-ing with (x,y) be given, or if not possible or advised, then a solution to taking two lists of (from x and y vals) and find a common value (if multiple, just one, anyone)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:00:48+00:00Added an answer on June 6, 2026 at 7:00 am

    somthing like this maybe

      var findX = 198
      var findY = 47
      var targetUrl
      for (var i=0; i<arr.length; i++)
      {
          for (var j=0; j<arr[i].length; j++)
          {
              if (findX = j[0] && findY == j[1])
              {
                  targetUrl = j[2]
              } 
          }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object in Javascript that looks like this function MyObject(){ this.name=; this.id=0;
So, I have a page that looks like the following: alt text http://img704.imageshack.us/img704/5973/croppercapture3.png This
I am working on this test page: http://www.problemio.com/index_new.php and you see the categories that
I have html that looks something like this: <div> <table> <tr onclick=show();> <td class=cell>Click
I have a list of data that is a schedule. Each item has a
I have a long list of data that I want to display in table
I have a list within a data frame (in this example, df$candpct ), and
I have some C structures related to a 'list' data structure. They look like
I'm using php,html,javascript,mysql. My functionality goes like this. I have a division made in
I currently have page-specific javascript files that look something like: $(document).ready(function () { namespace.home.list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.