def _explode_fields(model, model_json):
    """
    Handles traversing relationships if there are `__` in the JSON key
    """
    json_dict = {}
    for field in model_json.keys():
        if '__' in field:
            val = model_json[field]
            related_model_field_name = field.split('__')[0]
            RelatedModel = model._meta.get_field(related_model_field_name
                ).related_model
            related_filter = field.replace(related_model_field_name + '__', '')
            related_model = RelatedModel.objects.get(**{related_filter: val})
            json_dict[related_model_field_name] = related_model
        else:
            json_dict[field] = model_json[field]
    return json_dict
