dictionary - 字典中的模糊
问题描述
Im Ann 和 Fuzzy 一起工作。我想在字典中匹配我的内容。
所以它模糊了得到这个结果的正确方法吗?还是我应该先阅读其他任何可能性?
感谢您的阅读和幸福的一天!
字典现在看起来是这样的:
`enter code here`{
`enter code here`"apetizer": [
{
"name": "Apple Juice",
"type": "drink",
},
{
"name": "Apple Juice Extra",
"type": "drink",
},
"name": "liver",
"type": "meat",
}
],
"afterapetizer": [
{
"name": "Coca Cola Zero",
"type": "drink",
},
{
"name": "Coa Cola Light",
"type": "drink",
},
{
"name": "Coca Cola",
"type": "drink",
},
{
"name": "Coca Cola Zero",
"type": "drink",
},
{
"name": "Sandwich",
"type": "meat",
},
{
"name": "Sandwich Honey Mustard",
"type": "meat",
},
{
"name": "Long mediumSandwich,
"type": "meat",
},
],
Is ist possible to work with fuzzy in this case. I want that fuzzy gives me the same dictionary structure but only within in this example one match.
Result:
{ "apetizer": [ { "name": "Apple Juice", "type": "drink", }, "name": "liver", "type": "meat", } ], "afterapetizer": [{ "name": "Coca Cola", "type": "drink", }{ "name": "Sandwich", "type": "meat", }
],
解决方案
推荐阅读
- python - 如何根据 y 值向条形图添加颜色渐变?
- html - HTTP 中包含的网页的实际 HTML 标记在哪里?
- arrays - ObjectAtIndex 索引 0 超出分段控件中空数组的范围
- ios - Swift - 删除硬编码字符串的最佳方法是什么?
- flutter - 如何为在颤动中打开 pdf、doc.pptx 文件提供多个选项?
- c# - 从 C# 中的 DLL 访问类/方法
- java - 使用 Kafka 在两个微服务之间同步数据
- c# - 如何使用字符串和 int(字符串)值创建枚举
- java - 像 Telegram 一样长按后如何突出显示 recyclerView 的项目?
- javascript - 图表 js 使用 Json