首页 > 解决方案 > 字典中的模糊

问题描述

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", }
 ],

标签: dictionaryfuzzy-comparisonfuzzy

解决方案


推荐阅读