How to conditionally build an javascript object with features in

Written by Knut Melvær

I've been tinkering with RSS-feeds for podcasts in CLIsExpress and Serverless functions lately, which involves both parsing and constructing complex objects with lots of fields and information. Since you're dealing with user-generated data from different sources, you aren't guaranteed that all fields are populated all the times. Some fields are optional as well.

Earlier I would deal with this by conditionally applying new keys on an object like this:

Internal server error