我想使用 golang 動(dòng)態(tài)地從 mongodb 集合中獲取特定的鍵值對(duì)。err := collection.Find(operations).Limit(2).All(&products)我該怎么做,但它必須是動(dòng)態(tài)的,因?yàn)檫x擇鍵值對(duì)在我這邊發(fā)生了變化:收款文件:{ "_id" : 168, "entity_id" : "168", "type_id" : "simple", "attribute_set_id" : "24", "entity_type_id" : "4", "created_at" : "2013-10-31 14:51:18", "has_options" : "0", "required_options" : "0", "sku" : "AIC-19000-16", "updated_at" : "2016-11-22 21:04:46", "base_type" : 154, "table_shape" : 164, "manufacturer" : 15, "delivery" : "Free Delivery & Setup", "visibility" : 4, "tax_class_id" : 2, "status" : 1, "enable_googlecheckout" : 1, "discontinued" : 0, "featured_fme" : 0, "featured_product" : 0, "amxnotif_hide_alert" : 1, "is_recurring" : 0, "condition" : 3043, "ships" : null, "ignore_wisepricer" : 0, "fedexable" : null, "dropshipped" : 0, "verified_by" : 3301, "reward_point_product" : null, "mw_reward_point_sell_product" : null, "ashley_sale" : 0, "disable_amazonpayments" : 0, "for_configurables" : null, "rfm" : 0, "mk_stockmessage" : false, "mk_hideshipdate" : 0, "reviews_counter" : 0, "mpn" : "19000-16", "name" : "After Eight Titanium Leg Rectangular Dining Table", "style" : "73", "furniture_type" : "76", "meta_title" : "After Eight Titanium Leg Rectangular Dining Table, 19000-16, Aico Furniture", "meta_description" : "After Eight Titanium Leg Rectangular Dining Table from Aico Furniture, 19003-88", "options_container" : "container2", "url_key" : "after-eight-titanium-leg-rectangular-dining-table", "url_path" : "after-eight-titanium-leg-rectangular-dining- }
查看完整描述