【发布时间】:2014-10-17 06:25:06
【问题描述】:
如何从两个 json 文档中找到匹配的数据。例如:我有两个 json 文档和技能 json 文档。
在技能文档中:
{
"_id": "b013dcf12d1f7d333467b1447a00013a",
"_rev": "3-e54ad6a14046f809e6da872294939f12",
"core_skills": [
{
"core_skill_code": "SA1",
"core_skill_desc": "communicate with others in writing"
},
{
"core_skill_code": "SA2",
"core_skill_desc": "complete accurate well written work with attention to detail"
},
{
"core_skill_code": "SA3",
"core_skill_desc": "follow guidelines/procedures/rules and service level agreements"
},
{
"core_skill_code": "SA4",
"core_skill_desc": "ask for clarification and advice from others"
}
]}
在员工文档中:
{
"_id": "b013dcf12d1f7d333467b12350007op",
"_rev": "3-e54ad6a14046f809e6da156794939f12",
"employee_name" :"Ashwin",
"employee_role" : "Software engineer",
"core_skills":["SA1","SA4"]
}
【问题讨论】:
-
那么您要匹配的数据是什么?
-
我需要匹配核心技能数据。
-
你需要详细说明你想要做什么。
-
创建核心技能代码和描述的索引。然后你就可以破译员工记录中的代码了。
标签: javascript couchdb couchdb-futon