Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Damn I've been so close to this solution so many times, but somehow haven't been able to land the syntax apparently. It seems I'm not all the way there though, I had a closer look.. Some of the json attributes does not exist for all users, which can be handled the way you suggested. But as far as missing job position this is the actual json: ? "job": { "position": "None", "company_id": 0, "company_name": "None"`` So as you can see the attribute exists but is reported as "None" which I guess is a string instead of a null-value? Commented May 6, 2020 at 7:53
  • You are right when the value surrounded by " this is a string value if it will be just None it will be a None type. Commented May 6, 2020 at 8:05
  • Seems I'd actually misunderstood what attribute was causing the problem. The "None" strings handled just fine, I had a problem with other attributes not existing which was fixed with your code. Thanks! Commented May 6, 2020 at 8:24