How can i push up into an array if neither values exist? Here is my json array/object:
[
{ name: "tom", text: "tasty" },
{ name: "tom", text: "tasty" },
{ name: "tom", text: "tasty" },
{ name: "tom", text: "tasty" },
{ name: "tom", text: "tasty" }
]
If i tried to push again into the array with either name: "tom"
or text: "tasty"
i dont want anything to happen... but if neither of those are there then i want it to .push()
How can i do this?