import json. 2. if 'id' not in dest: 3. dest['id'] = -1. 4. targetId = dest['id']. Source: stackoverflow.com. python json check if key exist.
確定! 回上一頁