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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:28:53+00:00 2026-05-24T16:28:53+00:00

I have some JSON parsed, but I would like to take a link I

  • 0

I have some JSON parsed, but I would like to take a link I get from the JSON, find an identifier in the link that makes it different (e.g. http://www.foo.com/IDENTIFIER/home), and have that identifier as a string to plug into another function that uses the identifier.

Here’s the code where I try to use indexOf to find the preidentifier path index so I can then get the index of the identifier after it (that code hasn’t been written yet because I’m stuck here). This also uses JSONP.

$.jsonp({
    "url": "http://foo.com&callback=?",
    "data": {
    "alt": "json-in-script"
    },
    "success": function (data) {
        var link = data[0].link;
        var jsonText = JSON.stringify(link);

        // the below code returns string
        console.log('jsonText string?'+typeof jsonText); 

        // the below code returns that this method has no object indexOf
        var index = jsonText.indexof("pre-identifier-path/"); 

    },
    "error": function () {
    }
});

Thank you for your time, sorry if this a tad confusing.

  • 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-05-24T16:28:53+00:00Added an answer on May 24, 2026 at 4:28 pm

    The method should be named indexOf, it’s case sensitive. Ex.:

    jsonText.indexOf("pre-identifier-path/"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside my .aspx I have some JSON code that looks like this: function someFunctionName()
I would like to deserialise Scala case classes that have been serialised using lift-json.
I have some JSON data that looks like this: { 910719: { id: 910719,
Suppose you have some complex JSON like: {A : valA, B : { C
I have some data that I have to serialize to JSON. I'm using JSON.NET.
I have the following JSON: {COLUMNS:[ID,FIRSTNAME],DATA:[[1,Steve],[2,Jim],[3,Bill],[4,Tony]]} I am trying to write some jQuery that
I have some settings that I'd like to store in an external file of
I have some code that downloads lessons as JSON, parses them, and puts them
I have some jQuery that makes a call into a WCF service. When the
Is it possible to have a class that behaves like a string but allows

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.