I have an objects array as following
[{"ChannelName":"39-40","Text":"haha"}, {"ChannelName":"39-40","Text":"lala"} {"ChannelName":"40-41","Text":"bla bla"}, {"ChannelName":"40-41","Text":"kha kha"}]
How can I check duplicate value in ChannelName. What I need to do is when ChannelName exists in array object, I want to replace the ChannelName with new Text. How php check duplicate ChannelName and how to replace of old Text attribute with new Text attribute if ChannelName duplicate?