Deleting data from JSON

0 favourites
  • 2 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • I have the following (valid) JSON and I'm trying to delete one of the 3 activities. However, I cant seem to do it.

    I tried:

    -> JSON_MAIN: Remove 1 values at "profile_1.all_activiities" starting 0

    But that didnt do anything . ANyone have any ideas? Thanks

    {
    	"game_data": {
    		"last_profile": 0,
    		"setting_1": "",
    		"setting_2": ""
    	},
    	"profile_1": {
    		"has_data": 0,
    		"profile_id": 1,
    		"profile_name": "Test Name 1",
    		"profile_score": 0,
    		"profile_icon": "",
    		"settings": {
    			"setting_1": "",
    			"setting_2": "",
    			"setting_3": ""
    		},
    		"all_activities": [
    			{
    				"activity_name": "SOme activity 1",
    				"activity_icon": "",
    				"daily_goal": 0,
    				"weekly_goal": 0,
    				"activity_score": 0,
    				"activity_setting_1": "",
    				"activity_setting_2": "",
    				"activity_results": {
    					"00/00/0000": ""
    				}
    			},
    			{
    				"activity_name": "Act 2",
    				"activity_icon": "",
    				"daily_goal": 0,
    				"weekly_goal": 0,
    				"activity_score": 0,
    				"activity_setting_1": "",
    				"activity_setting_2": "",
    				"activity_results": {
    					"00/00/0000": ""
    				}
    			},
    			{
    				"activity_name": "Active 3",
    				"activity_icon": "",
    				"daily_goal": 0,
    				"weekly_goal": 0,
    				"activity_score": 0,
    				"activity_setting_1": "",
    				"activity_setting_2": "",
    				"activity_results": {
    					"00/00/0000": ""
    				}
    			}
    		]
    	}
    }
    
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • And the answer is: There is only one 'i' in 'activities.

    -> JSON_MAIN: Remove 1 values at "profile_1.all_activities" starting 0

    Doh!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)