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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:51:57+00:00 2026-06-04T12:51:57+00:00

I had a JSON string / object in my application. {list: [ {name:my Name,id:12,type:car

  • 0

I had a JSON string / object in my application.

{"list": [
    {"name":"my Name","id":12,"type":"car owner"},
    {"name":"my Name2","id":13,"type":"car owner2"},
    {"name":"my Name4","id":14,"type":"car owner3"},
    {"name":"my Name4","id":15,"type":"car owner5"}
]}

I had a filter box in my application, and when I type a name into that box, we have to filter the object and display the result.

For example, if the user types “name” and hits search, then we have to search full names in the JSON object and return the array, just like a MySQL search …

My question is to filter the json object with string and return the array….

  • 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-04T12:51:58+00:00Added an answer on June 4, 2026 at 12:51 pm

    You could just loop through the array and find the matches:

    var results = [];
    var searchField = "name";
    var searchVal = "my Name";
    for (var i=0 ; i < obj.list.length ; i++)
    {
        if (obj.list[i][searchField] == searchVal) {
            results.push(obj.list[i]);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am serializing , a MultiDictionary<String,Object> http://powercollections.codeplex.com/ to json . It has 618 elements
Has anyone had issues with a size limit on a returned JSON Object using
I have been working on a json decode issue (which I have already had
I had a Navigation Controller based application and decided to use tab bars. And
I had been asked to build crystal reports for an application, i used the
I've had problems trying to send JSON to ASP.NET MVC Controllers. I don't want
bada crashed on stringstream read. json::Object objDocument = d(); std::stringstream stream; json::Writer::Write(objDocument, stream); json::Object
I need to deserialize some JavaScript object represented in JSON to an appropriate C#
I have a complicated example of converting a Javascript Array to a JSON String.
I had a json parsing problem updating my app from prototype 1.6.1 to 1.7.0

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.