public void RemoveAll(Expression <Func <T, bool> > predicate = null)
        {
            var items = new List <T>();

            if (predicate == null)
            {
                items = ToList();
            }
            else
            {
                items = Where(predicate).ToList();
            }

            var removedItems = new List <T>();

            foreach (var item in items)
            {
                var itemIndex = items.FindIndex(x => x.ObjectId == item.ObjectId);
                removedItems.Add(item);
            }

            items = items.Except(removedItems).ToList();
            var irisList = new IRISList();

            irisList.AddRange(items);
            _irisNative.Set(irisList, GlobalsNativeConstants.CollectionGlobals, CollectionName);
        }
        public void ImportJsonStringToGlobal(string jsonStr)
        {
            var o        = JsonConvert.DeserializeObject <JToken>(jsonStr);
            var pathList = ExtractJsonPath(jsonStr);

            foreach (var path in pathList)
            {
                object data    = (object)o.SelectToken(path);
                string dataStr = JsonConvert.SerializeObject(data);
                _irisNative.Set(dataStr, GlobalName, "Node", path);
            }

            IRISList irisList = new IRISList();

            irisList.AddRange(pathList);
            _irisNative.Set(irisList, GlobalName, "Nodes");

            _irisNative.Set(jsonStr, GlobalName, "ActualJson");
        }