I am trying to format a column with a complex nested if statement but the column is ignoring the first if statement and only seeing the second. I have been trying to tweak this, but I can't get it to work. It looks correct to me.
If Resubmitted (Date/Time) is empty and Submitted(date/Time) + 45 days is less than or equal to today, then color field red, else if Resubmitted is not empty and Resubmitted +45 is less than or equal to today, then color field orange. The second half of the if statement works setting the background to orange. But the data in the fields that should be either true on the first IF, or false on the first IF and false on the second IF are disappearing when this JSON is added.
Anyone with another pair of eyes, please help and thank you in advance.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(Number([$Resubmitted])==0 && ([$Submitted]+3888000000) <= @now,'#ff0000',if(Number([$Resubmitted])!=0 &&([$Resubmitted]+3888000000) <= @now, '#ffa500',''))"
}
}


