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 8934257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:44:34+00:00 2026-06-15T09:44:34+00:00

I tried sample javascript code to call Google bigQuery API ( https://developers.google.com/bigquery/docs/authorization#client-side-javascript ) Js:

  • 0

I tried sample javascript code to call Google bigQuery API ( https://developers.google.com/bigquery/docs/authorization#client-side-javascript )

Js:

function runQuery() {
   var request = gapi.client.bigquery.jobs.query({
      'projectId': project_id,
      'timeoutMs': '30000',
      'query': 'SELECT TOP(repository_language, 5) as language, COUNT(*) as count FROM [publicdata:samples.github_timeline] WHERE repository_language != "";'
    });
    request.execute(function(response) {     
        console.log(response);
        var results = response.result.rows ;
        $('#result_box').html(JSON.stringify(results, null));
    });
}

Above big query returns :

[{"f":[{"v":"JavaScript"},{"v":"949899"}]},{"f":[{"v":"Ruby"},{"v":"640659"}]},{"f":[{"v":"Java"},{"v":"568202"}]},{"f":[{"v":"Python"},{"v":"484852"}]},{"f":[{"v":"PHP"},{"v":"453830"}]}]

Please help me how to parse the values from above results in JSON Format ?

{"JavaScript": "949899", "Ruby": "640659", "Java": "568202", "Python": "484852", "PHP": "453830" }
  • 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-15T09:44:34+00:00Added an answer on June 15, 2026 at 9:44 am

    Eval is a security risk.

    var text = '[{"f":[{"v":"JavaScript"},{"v":"949899"}]},{"f":[{"v":"Ruby"},{"v":"640659"}]},{"f":[{"v":"Java"},{"v":"568202"}]},{"f":[{"v":"Python"},{"v":"484852"}]},{"f":[{"v":"PHP"},{"v":"453830"}]}]';
    myData = JSON.parse(text);
    alert(myData[4].f[0].v);​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to compile Ercia Sadun's sample code here , but this error came
I tried to do it this: $(this + ' li:not(:nth-last-child(2)):not(:last-child)').hide() Full code sample: $('.comments').each(function(){
I want to call a javascript function from my ASP.NET (C#) code, I want
I am new to Android. I have tried an sample application for status bar
We have tried to create sample webservices helloworld in Java using Jersey and Tomcat
The sample application for SolrNET search is in MVC 2. I tried to convert
I created a sample webservice which contain default 'HelloWorld' function as 'webmethod' when tried
I am new to posix thread library, and I tried to compile a sample
I am trying White for the first time. I tried to run a sample
I have a bit of JavaScript code that is specified in a configuration file

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.