Im trying to remove a new line from a string like so:
jsonata_expr = r'''{
"ips": *.*.ip_addr,
"vlans": $join(vlans.($string(vlan_id)), ","),
"date": $now()
}'''
jsonata_expr.strip('\n')
'{\n "ips": *.*.ip_addr,\n "vlans": $join(vlans.($string(vlan_id)), ","),\n "date": $now()\n}'
But as you can see the newlines are still there. What am I doing wrong?