The similarity is that both are companions and counselors of a sort to the "Juliet" figure. Juliet allows the Nurse to know her thoughts, as Maria does with Anita. Beyond this, there is little similarity.
The Nurse is a minor figure in Romeo and Juliet. Anita, on the other hand, is the girlfriend of Bernardo, Maria's brother. In some sense, she's also the antithesis of the inexperienced and naïve Maria. Anita is a central figure in the (somewhat comical) dispute among the Latinx characters about the virtues of New York City in comparison with their native Puerto Rico in the number "America."
Anita is also a feminist symbol to a degree. She has no qualms about expressing herself as a woman, particularly when she sings "Anita's gonna get her kicks tonight" in anticipation of Bernardo seeing her in the aftermath of the brawl that will take place between the Sharks and the Jets. When Bernardo is killed, she essentially blames Maria, angrily telling her to forget that boy (Tony) and find "one of your own kind, stick to your own kind!"
By comparison with all this, Juliet's Nurse is a largely passive figure and a servant to Juliet rather than an equal, as Anita is to Maria.