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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:00:08+00:00 2026-06-18T23:00:08+00:00

In my controller I am calling a webservice Metadata.Client.Service.Client returnClient = new Metadata.Client.Service.Client(); returnClient

  • 0

In my controller I am calling a webservice

Metadata.Client.Service.Client returnClient = new Metadata.Client.Service.Client();

returnClient = client.UpdateClient(updateClient);

return Json(new { returnClient }, JsonRequestBehavior.AllowGet);   

In my .cshtml Ajax call as below

 $.ajax(
 {
     type: "GET",
     contentType: "application/json; charset=utf-8",
     url: '@Url.Action("UpdateRecord", "Client")',
     data: { "id": id, "name": clientName, "code": clientCode, "typeId": clientTypeId, "clientStatusCode": clientStatusCode },
     dataType: "json",
     beforeSend: function () {//alert(id);
     },
     error: function (request) {
     alert('error');    
     alert(request.responseText);
     },
     success: function (data) {
     alert('success');
     console.log(data);

     //var parsed = JSON.parse(data);
     //alert(parsed);
     //var k = JSON.stringify(data);
     //alert(parsed);

  }

I tried several ways to extract the data. In console.log it is showing as below

[09:27:07.989] ({returnClient:{ExtensionData:{}, ClientCode:"C09091", ClientId:39, ClientName:"Test1", ClientStatus:[{ExtensionData:{}, StatusCode:{ExtensionData:{}, Name:"Active", StatusCodeId:5}, StatusType:{ExtensionData:{}, Name:"OE", StatusTypeId:1}}], ClientType:{ExtensionData:{}, ClientTypeId:7, ClientTypeName:"FDFD"}}})

Please can anyone help out to extract this data

ie, ClientName, ClientCode, ClientId, ClientStatus.StatusCode, ClientStatus.Name, ClientStatus.StatusCodeId, StatusType.Name

  • 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-18T23:00:10+00:00Added an answer on June 18, 2026 at 11:00 pm
    success: function (data) {
        var ccode = data.returnClient.ClientCode;
        var cid = data.returnClient.ClientId;
        var cname = data.returnClient.ClientName;
        var ctypeid = data.returnClient.ClientType.ClientTypeId;
        var ctypename = data.returnClient.ClientType.ClientTypeName;
    
        for (var i = 0; i < data.returnClient.ClientStatus.length; i++) {
          var codeName = data.returnClient.ClientStatus[i].StatusCode.Name;
          var codeId = data.returnClient.ClientStatus[i].StatusCode.StatusCodeId;
          var typeName = data.returnClient.ClientStatus[i].StatusType.Name;
          var typeId = data.returnClient.ClientStatus[i].StatusType.StatusTypeId;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Calling a web service from my controller: $client = new \SoapClient(http://.../webservice/NAME_OF_PAGE.asmx?WSDL); $result = $client->EstadoHabitacionesFechas();
I am calling my controller method using .ajax. my controller method call web service
I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I have a controller method that returns a jSON object and in one calling
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
My controller (abstract controller) is calling a service class to get a URL. In
How can I refresh a view within a controller method calling redirect (or equivalent)?
I migrated from rails 2.x to 3.x. Now when calling a controller method throws
I am calling a function in my controller from a button click .... I
In my base controller's constructor I am calling an extension method that checks for

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.