说我有一些对象数组:
employees:[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"}
]
我可以使用Ruby的包含吗?做这样的事情的方法:
employees.include?("'firstName' = 'John'")
答案 0 :(得分:1)