How to avoid appending empty rows in array record type
Hi Team,
I have a requirement for creating an audit table in that i need compare the existing data and updated data and need to add only changed field values. for this 1st I'm querying the existing data in a local var, then after changing some fields in the UI, I'm performing a save into operation which involves a!foreach which compares the queried data & UI rule input fields so when there is a difference I'm appending one row for that changed field in audit record type rule input(array). but if there is no change I no need empty- row in audit table. but some how my code appending empty rows for fields with no changes.
Kindly provide suggestion it'll be helpful.
Thanks in advance

here I didn't change anything in one field but it gets adding null value
