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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:26:16+00:00 2026-06-10T23:26:16+00:00

I got this string of code, data is value returned inside a success callback

  • 0

I got this string of code, data is value returned inside a success callback in an ajax environment:

$('#cpt_rspp_value').text(data.Payload.Clerks.rspp.full_name)
$('#cpt_ddl_value').text(data.Payload.Clerks.ddl.full_name)
$('#cpt_rls_value').text(data.Payload.Clerks.rls.full_name)
$('#cpt_mc_value').text(data.Payload.Cler.mc.full_name)
$('#cpt_se_value').text(data.Payload.Clerks.se.full_name)

If, rspp really exists inside the DB the object data.Payload.Clerks.rspp.full_name will be present, so I can put it in right place (i.e: #cpt_rspp_value).
But, alas, if that object doesn’t exist, the js interpreter will stop, and so, even if next objects data.Payload.Clerks.ddl.full_name, data.Payload.Clerks.rls.full_name and so on, will be present, that row will never been processed.

I should “if” any lines, but how? if(data.Payload.Clerks.rspp.full_name) and if(data.Payload.Clerks.rspp.full_name != null) don’t resolve the issue.
What can I do?

  • 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-10T23:26:17+00:00Added an answer on June 10, 2026 at 11:26 pm

    You can use typeof javascript operator to check if the object defined,

    if(typeof data.Payload.Clerks.rspp.full_name != 'undefined')
    

    or

    if(typeof data.Payload.Clerks.rspp != 'undefined')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got code similar to this: string s = CreateString(); if (s == )
So I've got this String with book information: String data = Harry Potter 1
I've got this line of code: $(selector).find(:input[data-val=true]) This will correctly select elements like this
I got this function to split string but it's giving the spited string in
I've got this class: class Foo { public string Name { get; set; }
I've got this script on my website : $(document).ready(function() { function filterPath(string) { return
This question got me thinking about bare strings. When PHP sees a string that's
Hi I'm struggling with some regex I've got a string like this: a:b||c:{d:e||f:g}||h:i basically
I got a string in Ruby like this: str = enum('cpu','hdd','storage','nic','display','optical','floppy','other') Now i like
I got a string that contains the current date by using this : NSString

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.